
import 'package:provider_demo/net/api_repository.dart';
import 'package:provider_demo/provide/view_state_model.dart';

class DemoModel extends ViewStateModel {
     int num = 0;
     void add(){
        num++;
        notifyListeners();
     }

     void init() async{
         print("数据初始");
         setBusy();
        try {
          var _  = await ApiRespository.login("1111", "111");
          setIdle();
        }catch(e,s){
          setError(e, s);
        }
     }

}